# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=wificurse
pkgver=0.3.9
pkgrel=5
groups=('blackarch' 'blackarch-wireless')
pkgdesc='WiFi jamming tool.'
arch=('x86_64' 'aarch64')
url='https://github.com/oblique/wificurse'
makedepends=('git')
license=('GPL3')
source=("git+https://github.com/oblique/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd "$pkgname/src"

  awk -F' ' '/#define VERSION/ {gsub("\"",""); print $(NF)}' wificurse.h
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  make PREFIX="$pkgdir/usr" install

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

